package com.zhku.meeting.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhku.meeting.entities.Room;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface RoomMapper extends BaseMapper<Room> {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table meeting_room
     *
     * @mbg.generated Thu Jun 11 23:28:47 CST 2020
     */
    int deleteByPrimaryKey(Integer roomId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table meeting_room
     *
     * @mbg.generated Thu Jun 11 23:28:47 CST 2020
     */
    int insert(Room record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table meeting_room
     *
     * @mbg.generated Thu Jun 11 23:28:47 CST 2020
     */
    Room selectByPrimaryKey(Integer roomId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table meeting_room
     *
     * @mbg.generated Thu Jun 11 23:28:47 CST 2020
     */
    List<Room> selectAll();

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table meeting_room
     *
     * @mbg.generated Thu Jun 11 23:28:47 CST 2020
     */
    int updateByPrimaryKey(Room record);

    List<Room> selectByNo(Room record);

    Room duplicateCheck(Room room);

    void updateEquipment(@Param("roomId") Integer id, @Param("air") Boolean air,@Param("projector")Boolean projector);

    IPage<Room> selectRoom(Page<Room> objects);
}